package com.mililoan.persist.system;

import org.springframework.stereotype.Repository;

import com.mililoan.common.bean.PageResultSet;
import com.mililoan.model.system.Department;

/**
 * 部门表DAO接口
 * @author taochen
 * @version 1.0
 * @since 2017-08-26
 */
@Repository("departmentDao") 
public interface DepartmentDao {	 
	/**
	 * @Title: add
	 * @Description: 新增数据
	 * @author taochen
	 *
	 * @param department
	 * @return
	 * @throws Exception 
	 */
	public Long add(final Department department) throws Exception;
	
	/**
	 * @Title: update
	 * @Description: 修改数据
	 * @author taochen
	 *
	 * @param department
	 * @return
	 * @throws Exception 
	 */
	public Long update(final Department department) throws Exception;
	
	/**
	 * @Title: delete
	 * @Description: 删除
	 * @author taochen
	 *
	 * @param keyId
	 * @return
	 * @throws Exception 
	 */
	public Long delete(Long keyId) throws Exception;
	
	/**
	 * @Title: queryDepartmentList
	 * @Description: 分页查询相关信息
	 * @author taochen
	 *
	 * @return
	 * @throws Exception 
	 */
	public PageResultSet<Department> queryDepartmentList(Department department, int page, int pageSize) throws Exception;
 
 	/**
	 * @Description: 根据主键拿到对象
	 * @author taochen
	 * @param keyId
	 *
	 * @return
	 * @throws Exception 
	 */
	public Department getDepartmentById(Long keyId) throws Exception;
}